#include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>

#define MAX_CONNECT_COUNT 100

#pragma once
#pragma comment(lib, "Ws2_32.lib")


// CClientSocket

class CClientSocket : public CObject
{

public:
	CClientSocket();
	virtual ~CClientSocket();

private:
	WSADATA		wsaData;

public:
	SOCKET		m_socketListen;
	CPtrList	m_ptrClientList;
	CPtrList	m_ptrClientIPList;

protected:
public:
	BOOL InitSocket(void);
	BOOL CloseSocket(void);
	BOOL StartListen(void);
	BOOL Accept(SOCKET* socketCurrent);
	BOOL DestroySocket(SOCKET socketDelete);
};


